package leetcode.offer;

/**
 * @ClassName T03
 * @Description TODO
 * @Author Fanxc
 * @DATE 2020/11/29 0029 20:34
 * @Version 1.0
 */
public class T05 {
    class Solution {
        public String replaceSpace(String s) {
            StringBuffer sb=new StringBuffer();
            for (int i = 0; i < s.length(); i++) {
                char c=s.charAt(i);
                if (c==' '){
                    sb.append("%20");
                }else {
                    sb.append(c);
                }
            }
            return sb.toString();
        }
    }
}
